<!--
 * @Author: yhlz-${username}
 * @Date: 2022-02-06 17:12:15
 * @LastEditTime: 2022-02-28 23:06:21
 * @LastEditors: yhlz-${username}
 * yhlz.com
-->
<template>
  <div class="header">
    <span @click="toggle">
      <el-icon-expand v-if="collapse" style="margin-right: 10px"></el-icon-expand>
      <el-icon-fold v-else></el-icon-fold>
    </span>
  </div>
</template>

<script lang="ts" setup>
let navHeaderProps = defineProps<{
  collapse: boolean;
}>();
let emits = defineEmits(["update:collapse"]);
let toggle = () => {
  emits("update:collapse", !navHeaderProps.collapse);
};
</script>

<style scoped>
.header {
  height: 60px;
  padding: 0 20px;
  display: flex;
  align-items: center;
}
</style>
